package lexer;

public class Word extends Token {
    public String lexeme = "";

    public static final String AND_TAG = "&&";

    public static final String OR_TAG = "||";

    public static final String EQ_TAG = "==";

    public static final String NE_TAG = "!=";

    public static final String LE_TAG = "<=";

    public static final String GE_TAG = ">=";

    public static final String MINUS_TAG = "minus";

    public static final String TRUE_TAG = "true";

    public static final String FALSE_TAG = "false";

    public static final String TEMP_TAG = "temp";

    public Word(String s, int tag) {
        super(tag);
        lexeme = s;
    }

    @Override
    public String toString() {
        return lexeme;
    }

    public static final Word
        and = new Word(AND_TAG, Tag.AND),
        or = new Word(OR_TAG, Tag.OR),
        eq = new Word(EQ_TAG, Tag.EQ),
        ne = new Word(NE_TAG, Tag.NE),
        le = new Word(LE_TAG, Tag.LE),
        ge = new Word(GE_TAG, Tag.GE),
        minus = new Word(MINUS_TAG, Tag.MINUS),
        True = new Word(TRUE_TAG, Tag.TRUE),
        False = new Word(FALSE_TAG, Tag.FALSE),
        temp = new Word(TEMP_TAG, Tag.TEMP);
}
